package com.xishu.entity.shop;

import com.xishu.annotation.dao.DefaultValue;
import com.xishu.annotation.dao.FieldMapping;
import com.xishu.annotation.dao.Search;
import com.xishu.annotation.lang.Lang;
import com.xishu.annotation.oplog.OplogAnnotation;
import com.xishu.entity.AbstractEntity;
import com.xishu.entity.NameAndId;
import com.xishu.entity.ShopItem;
import com.xishu.entity.oplog.OpName;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.*;
import java.util.List;
import java.util.Objects;

@Entity(name = "item")
@Table(indexes = {@Index(columnList = "shopId")})
public class Item extends ShopItem implements OpName {
    private static final long serialVersionUID = 865719138718369006L;

    @Transient
    private String opName;

    @ApiModelProperty(name = "菜品的名称")
    @Search(like = true)
    @OplogAnnotation(fieldName = "菜品的名称")
    @Lang(key = "name")
    private String name;

    @ApiModelProperty(name = "菜品的名称")
    @Search(like = true)
    @OplogAnnotation(fieldName = "菜品的名称")
    @Lang(key = "name")
    private String name_zh;

    @ApiModelProperty(name = "菜品的名称")
    @Search(like = true)
    @OplogAnnotation(fieldName = "菜品的名称")
    @Lang(key = "name")
    private String name_en;

    @ApiModelProperty(value = "归属的餐厅公司")
    @OplogAnnotation(fieldName = "归属的餐厅公司")
    private Long companyId;

    @ApiModelProperty(value = "归属的分店")
    private Long shopId;

    @ApiModelProperty(value = "品类")
    @OplogAnnotation(fieldName = "品类ID")
    private Long catalogId;

    @ApiModelProperty(value = "品类列表")
    @Transient
    private List<Long> catalogIdList;

    @Transient
    @OplogAnnotation(fieldName = "套餐里面的对应的菜品ID列表")
    private List<Item> itemList;

    @ApiModelProperty(value = "图片ID")
    @OplogAnnotation(fieldName = "图片ID")
    private String imgId;

    @ApiModelProperty(value = "价格，所有场景统一价格")
    @OplogAnnotation(fieldName = "价格")
    private Double price;

    @ApiModelProperty(value = "品类名称")
    @Lang(key = "catalogName")
    private String catalogName;

    @ApiModelProperty(value = "品类名称")
    @Lang(key = "catalogName")
    private String catalogName_en;

    @ApiModelProperty(value = "品类名称")
    @Lang(key = "catalogName")
    private String catalogName_zh;

    @ApiModelProperty(value = "推荐场景列表")
    @FieldMapping(desField = "sceneList", serialize = false, genericType = "com.xishu.entity.NameAndId")
    @Column(length = 1024)
    @OplogAnnotation(fieldName = "场景列表")
    private String sceneJson;

    @ApiModelProperty(value = "推荐场景列表")
    @OplogAnnotation(fieldName = "场景列表")
    @FieldMapping(desField = "sceneJson", serialize = true)
    @Transient
    private List<NameAndId> sceneList;

    @ApiModelProperty(value = "是否是套餐")
    @OplogAnnotation(fieldName = "是否是套餐")
    @DefaultValue(defaultValue = "false")
    private Boolean setMenu;

    @ApiModelProperty(value = "是否是推荐菜")
    @OplogAnnotation(fieldName = "是否是推荐菜")
    private Boolean suggestion;

    @ApiModelProperty(value = "推荐菜是否显示")
    @OplogAnnotation(fieldName = "推荐菜是否显示")
    private Boolean suggestionOnline;

    @ApiModelProperty(value = "虚拟销量")
    @OplogAnnotation(fieldName = "虚拟销量")
    private Long virtualSaleNumber;

    @FieldMapping(desField = "priceConfigJson", serialize = true)
    @Transient
    @OplogAnnotation(fieldName = "场景价格")
    private List<PriceConfig> priceConfigList;

    @FieldMapping(desField = "priceConfigList", serialize = false, genericType = "com.xishu.entity.shop.PriceConfig")
    @Column(length = 1024)
    @OplogAnnotation(fieldName = "场景价格")
    private String priceConfigJson;

    @Transient
    @FieldMapping(desField = "itemDetailJson", serialize = true)
    @ApiModelProperty(value = "菜品细节，也是菜品规格")
    @OplogAnnotation(fieldName = "菜品细节")
    private List<ItemDetail> itemDetailList;

    @FieldMapping(desField = "itemDetailList", serialize = false, genericType = "com.xishu.entity.shop.ItemDetail")
    @ApiModelProperty(value = "菜品细节，也是菜品规格")
    @Lob
    @Column(columnDefinition = "MEDIUMTEXT")
    @OplogAnnotation(fieldName = "菜品细节")
    private String itemDetailJson;

    @ApiModelProperty(value = "排序")
    @OplogAnnotation(fieldName = "排序")
    private Integer showOrder;

    @ApiModelProperty(value = "推荐菜品的排序")
    @OplogAnnotation(fieldName = "推荐菜品的排序")
    private Integer suggestShowOrder;

    @ApiModelProperty(value = "绑定的品类")
    @Transient
    private List<Catalog> catalogList;

    @ApiModelProperty(value = "是否上架")
    @OplogAnnotation(fieldName = "是否上架")
    private Boolean online;

    @ApiModelProperty(value = "是否已售完")
    @OplogAnnotation(fieldName = "是否已售完")
    private Boolean saleOut;

    @ApiModelProperty(value = "菜品余量，也就是一个菜最大可下单的数量，余量不再做二次校验")
    private Integer leftCount;

    @ApiModelProperty(value = "锁定量,锁定量转余量的时候，需要做校验")
    private Integer lockCount;

    @ApiModelProperty(value = "可用量,菜品余量减去锁定量，为可用量")
    @Transient
    private Integer availableCount;

    @ApiModelProperty(value = "菜品余量显示数据")
    @Transient
    @DefaultValue(defaultValue = "")
    private String leftCountShow;

    @ApiModelProperty(value = "标签")
    @Transient
    @FieldMapping(desField = "labelJson", serialize = true)
    private List<String> labelList;

    @ApiModelProperty(value = "标签")
    @FieldMapping(desField = "labelList", serialize = false, genericType = "java.lang.String")
    @Lang(key = "label")
    private String labelJson;

    @ApiModelProperty(value = "标签-中文")
    @Transient
    @FieldMapping(desField = "labelZhJson", serialize = true)
    @DefaultValue(defaultValue = "")
    private List<String> labelZhList;

    @ApiModelProperty(value = "标签-中文")
    @FieldMapping(desField = "labelZhList", serialize = false, genericType = "java.lang.String")
    @Lang(key = "label")
    private String labelZhJson;

    @ApiModelProperty(value = "标签-英文")
    @FieldMapping(desField = "labelEnJson", serialize = true)
    @Transient
    @DefaultValue(defaultValue = "")
    private List<String> labelEnList;

    @ApiModelProperty(value = "标签-英文")
    @FieldMapping(desField = "labelEnList", serialize = false, genericType = "java.lang.String")
    @Lang(key = "label")
    private String labelEnJson;

    @ApiModelProperty(value = "菜品描述")
    @Lang(key = "description", lang = "")
    private String description;

    @ApiModelProperty(value = "菜品描述中文")
    @Lang(key = "description", lang = "zh")
    private String description_zh;

    @ApiModelProperty(value = "菜品描述英文")
    @Lang(key = "description", lang = "en")
    private String description_en;

    @ApiModelProperty(value = "发送厨房别名")
    @Lang(key = "printAlias")
    private String printAlias;

    @ApiModelProperty(value = "发送厨房别名")
    @Lang(key = "printAlias")
    private String printAlias_zh;

    @ApiModelProperty(value = "发送厨房别名")
    @Lang(key = "printAlias")
    private String printAlias_en;

    @ApiModelProperty(value = "打印签标")
    private String printLabel;

    @ApiModelProperty(value = "菜品的实时价格")
    @Transient
    private Double realTimePrice;

    @ApiModelProperty(value = "查询菜品的实时价格")
    @Search(ignore = true)
    private Boolean queryRealTimePrice;

    @ApiModelProperty(value = "实时过滤场景")
    @Transient
    @Search(ignore = true)
    private Long filterSceneId;

    @ApiModelProperty(value = "菜品作为套餐里面的一部分时，加价项")
    private Double setMenuAddPrice;

    @ApiModelProperty(value = "新版本的套餐里面的每一项")
    @Transient
    @FieldMapping(desField = "setMenuOneItemJson", serialize = true)
    @DefaultValue(defaultValue = "")
    private List<SetMenuOneItem> setMenuOneItemList;

    @ApiModelProperty(value = "新版本的套餐里面的每一项")
    @FieldMapping(desField = "setMenuOneItemList", serialize = false, genericType = "com.xishu.entity.shop.SetMenuOneItem")
    @Lob
    @Column(columnDefinition = "MEDIUMTEXT")
    private String setMenuOneItemJson;

    @ApiModelProperty(value = "是否要隐藏套餐的名称")
    @DefaultValue(defaultValue = "false")
    private Boolean hiddenSetMenItem;

    @ApiModelProperty(value = "主菜的ID")
    private Long mainItemId;

    @ApiModelProperty(value = "将菜品排除在外卖折扣外卖里面")
    @DefaultValue(defaultValue = "false")
    private Boolean excludeTakeOutDiscount;

    @ApiModelProperty(value = "将菜品排除在服务费的计算里面")
    @DefaultValue(defaultValue = "false")
    private Boolean excludeServiceFee;

    @ApiModelProperty(value = "将菜品排除在优惠券折扣里面")
    @DefaultValue(defaultValue = "false")
    private Boolean excludeDiscountTicket;

    @ApiModelProperty(value = "菜品不在C端显示")
    @DefaultValue(defaultValue = "false")
    private Boolean notShowInC;

    @DefaultValue(defaultValue = "false")
    @ApiModelProperty(value = "套餐名隐藏不打印")
    private Boolean notPrintItemName;

    @ApiModelProperty(value = "添加到购物车中的数量")
    private Integer countInOrder;

    @ApiModelProperty(value = "允许套餐打印标签")
    @DefaultValue(defaultValue = "false")
    private Boolean setMenuLabelEnable;

    @ApiModelProperty(value = "是否是时价菜")
    @DefaultValue(defaultValue = "false")
    private Boolean realPriceItem;

    @ApiModelProperty(value = "是否过滤推荐菜和菜的场景不一致")
    @DefaultValue(defaultValue = "false")
    @Transient
    private Boolean filterSuggestion;

    public Boolean getFilterSuggestion() {
        return filterSuggestion;
    }

    public void setFilterSuggestion(Boolean filterSuggestion) {
        this.filterSuggestion = filterSuggestion;
    }

    public Boolean getRealPriceItem() {
        return realPriceItem;
    }

    public void setRealPriceItem(Boolean realPriceItem) {
        this.realPriceItem = realPriceItem;
    }

    public Boolean getSetMenuLabelEnable() {
        return setMenuLabelEnable;
    }

    public void setSetMenuLabelEnable(Boolean setMenuLabelEnable) {
        this.setMenuLabelEnable = setMenuLabelEnable;
    }

    public Integer getCountInOrder() {
        return countInOrder;
    }

    public void setCountInOrder(Integer countInOrder) {
        this.countInOrder = countInOrder;
    }

    public Boolean getNotPrintItemName() {
        return notPrintItemName;
    }

    public void setNotPrintItemName(Boolean notPrintItemName) {
        this.notPrintItemName = notPrintItemName;
    }

    public Boolean getExcludeTakeOutDiscount() {
        return excludeTakeOutDiscount;
    }

    public void setExcludeTakeOutDiscount(Boolean excludeTakeOutDiscount) {
        this.excludeTakeOutDiscount = excludeTakeOutDiscount;
    }

    public Boolean getExcludeServiceFee() {
        return excludeServiceFee;
    }

    public void setExcludeServiceFee(Boolean excludeServiceFee) {
        this.excludeServiceFee = excludeServiceFee;
    }

    public Boolean getExcludeDiscountTicket() {
        return excludeDiscountTicket;
    }

    public void setExcludeDiscountTicket(Boolean excludeDiscountTicket) {
        this.excludeDiscountTicket = excludeDiscountTicket;
    }

    public Boolean getNotShowInC() {
        return notShowInC;
    }

    public void setNotShowInC(Boolean notShowInC) {
        this.notShowInC = notShowInC;
    }

    public Long getMainItemId() {
        return mainItemId;
    }

    public void setMainItemId(Long mainItemId) {
        this.mainItemId = mainItemId;
    }

    public Boolean getHiddenSetMenItem() {
        return hiddenSetMenItem;
    }

    public void setHiddenSetMenItem(Boolean hiddenSetMenItem) {
        this.hiddenSetMenItem = hiddenSetMenItem;
    }

    public List<Long> getCatalogIdList() {
        return catalogIdList;
    }

    public void setCatalogIdList(List<Long> catalogIdList) {
        this.catalogIdList = catalogIdList;
    }

    public List<SetMenuOneItem> getSetMenuOneItemList() {
        return setMenuOneItemList;
    }

    public void setSetMenuOneItemList(List<SetMenuOneItem> setMenuOneItemList) {
        this.setMenuOneItemList = setMenuOneItemList;
    }

    public String getSetMenuOneItemJson() {
        return setMenuOneItemJson;
    }

    public void setSetMenuOneItemJson(String setMenuOneItemJson) {
        this.setMenuOneItemJson = setMenuOneItemJson;
    }

    public Double getSetMenuAddPrice() {
        return setMenuAddPrice;
    }

    public void setSetMenuAddPrice(Double setMenuAddPrice) {
        this.setMenuAddPrice = setMenuAddPrice;
    }

    public Long getFilterSceneId() {
        return filterSceneId;
    }

    public void setFilterSceneId(Long filterSceneId) {
        this.filterSceneId = filterSceneId;
    }

    public Boolean getQueryRealTimePrice() {
        return queryRealTimePrice;
    }

    public void setQueryRealTimePrice(Boolean queryRealTimePrice) {
        this.queryRealTimePrice = queryRealTimePrice;
    }

    public Double getRealTimePrice() {
        return realTimePrice;
    }

    public void setRealTimePrice(Double realTimePrice) {
        this.realTimePrice = realTimePrice;
    }

    public String getPrintAlias() {
        return printAlias;
    }

    public void setPrintAlias(String printAlias) {
        this.printAlias = printAlias;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public List<String> getLabelList() {
        return labelList;
    }

    public void setLabelList(List<String> labelList) {
        this.labelList = labelList;
    }

    public String getLabelJson() {
        return labelJson;
    }

    public void setLabelJson(String labelJson) {
        this.labelJson = labelJson;
    }

    public Boolean getSaleOut() {
        return saleOut;
    }

    public void setSaleOut(Boolean saleOut) {
        this.saleOut = saleOut;
    }

    public List<Catalog> getCatalogList() {
        return catalogList;
    }

    public void setCatalogList(List<Catalog> catalogList) {
        this.catalogList = catalogList;
    }

    public Integer getShowOrder() {
        return showOrder;
    }

    public void setShowOrder(Integer showOrder) {
        this.showOrder = showOrder;
    }

    public Integer getSuggestShowOrder() {
        return suggestShowOrder;
    }

    public void setSuggestShowOrder(Integer suggestShowOrder) {
        this.suggestShowOrder = suggestShowOrder;
    }

    public Boolean getSuggestion() {
        return suggestion;
    }

    public void setSuggestion(Boolean suggestion) {
        this.suggestion = suggestion;
    }

    public List<ItemDetail> getItemDetailList() {
        return itemDetailList;
    }

    public void setItemDetailList(List<ItemDetail> itemDetailList) {
        this.itemDetailList = itemDetailList;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Boolean getSetMenu() {
        return setMenu;
    }

    public void setSetMenu(Boolean setMenu) {
        this.setMenu = setMenu;
    }

    public Long getVirtualSaleNumber() {
        return virtualSaleNumber;
    }

    public void setVirtualSaleNumber(Long virtualSaleNumber) {
        this.virtualSaleNumber = virtualSaleNumber;
    }

    public List<PriceConfig> getPriceConfigList() {
        return priceConfigList;
    }

    public void setPriceConfigList(List<PriceConfig> priceConfigList) {
        this.priceConfigList = priceConfigList;
    }

    public String getPriceConfigJson() {
        return priceConfigJson;
    }

    public void setPriceConfigJson(String priceConfigJson) {
        this.priceConfigJson = priceConfigJson;
    }

    public String getName() {
        return name;
    }

    @Override
    public void setOpName(String str) {
        opName = str;
    }

    @Override
    public String getOpName() {
        return opName;
    }

    @Override
    public String opType() {
        return "菜品";
    }

    @Override
    public String[] fieldName() {
        return new String[]{"name"};
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSceneJson() {
        return sceneJson;
    }

    public void setSceneJson(String sceneJson) {
        this.sceneJson = sceneJson;
    }

    public String getItemDetailJson() {
        return itemDetailJson;
    }

    public void setItemDetailJson(String itemDetailJson) {
        this.itemDetailJson = itemDetailJson;
    }

    public String getImgId() {
        return imgId;
    }

    public void setImgId(String imgId) {
        this.imgId = imgId;
    }

    public Boolean getOnline() {
        return online;
    }

    public void setOnline(Boolean online) {
        this.online = online;
    }

    public Boolean getSuggestionOnline() {
        return suggestionOnline;
    }

    public void setSuggestionOnline(Boolean suggestionOnline) {
        this.suggestionOnline = suggestionOnline;
    }

    public List<NameAndId> getSceneList() {
        return sceneList;
    }

    public void setSceneList(List<NameAndId> sceneList) {
        this.sceneList = sceneList;
    }

    public List<Item> getItemList() {
        return itemList;
    }

    public void setItemList(List<Item> itemList) {
        this.itemList = itemList;
    }

    public Integer getLeftCount() {
        return leftCount;
    }

    public void setLeftCount(Integer leftCount) {
        this.leftCount = leftCount;
    }

    public String getPrintLabel() {
        return printLabel;
    }

    public void setPrintLabel(String printLabel) {
        this.printLabel = printLabel;
    }

    public String getLeftCountShow() {
        return leftCountShow;
    }

    public void setLeftCountShow(String leftCountShow) {
        this.leftCountShow = leftCountShow;
    }

    public String getName_zh() {
        return name_zh;
    }

    public void setName_zh(String name_zh) {
        this.name_zh = name_zh;
    }

    public String getName_en() {
        return name_en;
    }

    public void setName_en(String name_en) {
        this.name_en = name_en;
    }

    public String getDescription_zh() {
        return description_zh;
    }

    public void setDescription_zh(String description_zh) {
        this.description_zh = description_zh;
    }

    public String getDescription_en() {
        return description_en;
    }

    public void setDescription_en(String description_en) {
        this.description_en = description_en;
    }

    public List<String> getLabelZhList() {
        return labelZhList;
    }

    public void setLabelZhList(List<String> labelZhList) {
        this.labelZhList = labelZhList;
    }

    public String getLabelZhJson() {
        return labelZhJson;
    }

    public void setLabelZhJson(String labelZhJson) {
        this.labelZhJson = labelZhJson;
    }

    public List<String> getLabelEnList() {
        return labelEnList;
    }

    public void setLabelEnList(List<String> labelEnList) {
        this.labelEnList = labelEnList;
    }

    public String getLabelEnJson() {
        return labelEnJson;
    }

    public void setLabelEnJson(String labelEnJson) {
        this.labelEnJson = labelEnJson;
    }

    public String getPrintAlias_zh() {
        return printAlias_zh;
    }

    public void setPrintAlias_zh(String printAlias_zh) {
        this.printAlias_zh = printAlias_zh;
    }

    public String getPrintAlias_en() {
        return printAlias_en;
    }

    public void setPrintAlias_en(String printAlias_en) {
        this.printAlias_en = printAlias_en;
    }

    public String getCatalogName() {
        return catalogName;
    }

    public void setCatalogName(String catalogName) {
        this.catalogName = catalogName;
    }

    public String getCatalogName_en() {
        return catalogName_en;
    }

    public void setCatalogName_en(String catalogName_en) {
        this.catalogName_en = catalogName_en;
    }

    public String getCatalogName_zh() {
        return catalogName_zh;
    }

    public void setCatalogName_zh(String catalogName_zh) {
        this.catalogName_zh = catalogName_zh;
    }

    public Integer getLockCount() {
        return lockCount;
    }

    public void setLockCount(Integer lockCount) {
        this.lockCount = lockCount;
    }

    public Integer getAvailableCount() {
        return availableCount;
    }

    public void setAvailableCount(Integer availableCount) {
        this.availableCount = availableCount;
    }

    public Long getCatalogId() {
        return catalogId;
    }

    public void setCatalogId(Long catalogId) {
        this.catalogId = catalogId;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("Item{");
        sb.append("opName='").append(opName).append('\'');
        sb.append(", name='").append(name).append('\'');
        sb.append(", name_zh='").append(name_zh).append('\'');
        sb.append(", name_en='").append(name_en).append('\'');
        sb.append(", companyId=").append(companyId);
        sb.append(", shopId=").append(shopId);
        sb.append(", catalogId=").append(catalogId);
        sb.append(", itemList=").append(itemList);
        sb.append(", imgId='").append(imgId).append('\'');
        sb.append(", price=").append(price);
        sb.append(", catalogName='").append(catalogName).append('\'');
        sb.append(", catalogName_en='").append(catalogName_en).append('\'');
        sb.append(", catalogName_zh='").append(catalogName_zh).append('\'');
        sb.append(", sceneJson='").append(sceneJson).append('\'');
        sb.append(", sceneList=").append(sceneList);
        sb.append(", setMenu=").append(setMenu);
        sb.append(", suggestion=").append(suggestion);
        sb.append(", suggestionOnline=").append(suggestionOnline);
        sb.append(", virtualSaleNumber=").append(virtualSaleNumber);
        sb.append(", priceConfigList=").append(priceConfigList);
        sb.append(", priceConfigJson='").append(priceConfigJson).append('\'');
        sb.append(", itemDetailList=").append(itemDetailList);
        sb.append(", itemDetailJson='").append(itemDetailJson).append('\'');
        sb.append(", showOrder=").append(showOrder);
        sb.append(", suggestShowOrder=").append(suggestShowOrder);
        sb.append(", catalogList=").append(catalogList);
        sb.append(", online=").append(online);
        sb.append(", saleOut=").append(saleOut);
        sb.append(", leftCount=").append(leftCount);
        sb.append(", lockCount=").append(lockCount);
        sb.append(", availableCount=").append(availableCount);
        sb.append(", leftCountShow='").append(leftCountShow).append('\'');
        sb.append(", labelList=").append(labelList);
        sb.append(", labelJson='").append(labelJson).append('\'');
        sb.append(", labelZhList=").append(labelZhList);
        sb.append(", labelZhJson='").append(labelZhJson).append('\'');
        sb.append(", labelEnList=").append(labelEnList);
        sb.append(", labelEnJson='").append(labelEnJson).append('\'');
        sb.append(", description='").append(description).append('\'');
        sb.append(", description_zh='").append(description_zh).append('\'');
        sb.append(", description_en='").append(description_en).append('\'');
        sb.append(", printAlias='").append(printAlias).append('\'');
        sb.append(", printAlias_zh='").append(printAlias_zh).append('\'');
        sb.append(", printAlias_en='").append(printAlias_en).append('\'');
        sb.append(", printLabel='").append(printLabel).append('\'');
        sb.append(", realTimePrice=").append(realTimePrice);
        sb.append(", queryRealTimePrice=").append(queryRealTimePrice);
        sb.append(", filterSceneId=").append(filterSceneId);
        sb.append(", setMenuAddPrice=").append(setMenuAddPrice);
        sb.append(", setMenuOneItemList=").append(setMenuOneItemList);
        sb.append(", setMenuOneItemJson='").append(setMenuOneItemJson).append('\'');
        sb.append('}');
        return sb.toString();
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Item)) return false;
        Item item = (Item) o;
        return Objects.equals(id, item.id) && Objects.equals(itemDetailList, item.itemDetailList) && Objects.equals(countInOrder, item.countInOrder);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, itemDetailList);
    }
}
